//support.js
// 01 使用fp.add(x,y) 和fp.map(f,x)创建一个能让functor里的值增加的函数ex1
//app.js
const fp = require('lodash/fp')
const {Maybe, Container} = require('./support')
let maybe = Maybe.of([5,6,1])
let ex1 = () => {
    //你需要实现的函数。。。
}



//app.js 实现一个函数ex2 ,能使用fp.first获取列表的第一个元素
const  fp = require('lodash/fp')
const { Maybe, Container} = require('./support')
let xs = Container.of(['do', 'ray','me' , 'fa', 'so', 'la', 'ti', 'do'])
let ex2 = () =>{
    //实现的函数
}

//实现一个函数ex3,使用safaProp和fp.first找到user的名字的首字母
// app.js
const fp = require('lodash/fp')
const {Maybe, Container} = require('./support')
let safaProp = fp.curry(function(x, o){
   return Maybe.of(o[x]) 
})
let user = {id:2,name:'Albert'}
let ex3 = () => {
    //实现的函数
}


// 使用Maybe重写ex4，不要有if语句
//app.js
const fp = require('lodash/fp')
const {Maybe, Container} = require('./support')
let ex4 = function(n){
    if(n){
        return parseInt(n)
    }
}